package com.itheima.sh.mapper;

import com.itheima.sh.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Mapper
public interface UserMapper {

    public List<User> findAll();

    User findUser(@Param("id") Integer id);
    @Transactional
    void addUser(@Param("user") User user);
    @Transactional
    void updateUser(@Param("id") Integer id,@Param("user") User user);
    @Transactional
    void deleteUser(@Param("id") Integer id);

}